import request from '@/utils/request'

// 查询活动列表列表
export function listActivities(query) {
  return request({
    url: '/activity/activities/list',
    method: 'get',
    params: query
  })
}


// 查询活动列表详细
export function getActivities(activityId) {
  return request({
    url: '/activity/activities/' + activityId,
    method: 'get'
  })
}

// 新增活动列表
export function addActivities(data) {
  return request({
    url: '/activity/activities',
    method: 'post',
    data: data
  })
}

// 修改活动列表
export function updateActivities(data) {
  return request({
    url: '/activity/activities',
    method: 'put',
    data: data
  })
}

// 修改活动列表
export function updateActivitySummary(data) {
  return request({
    url: '/activity/summary',
    method: 'put',
    data: data
  })
}

// 删除活动列表
export function delActivities(activityId) {
  return request({
    url: '/activity/activities/' + activityId,
    method: 'delete'
  })
}
//添加参与人
export function addactivityParticipant(activityId) {
  return request({
    url: '/activity/participants/' + activityId,
    method: 'post',
  });
}

//删除参与人
export function delactivityParticipant(data) {
  return request({
    url: '/activity/participants',
    method: 'delete',
    data: data
  })
}

